import { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';
import { CheckCircleOutlined } from '@vicons/antd';
import { renderIcon } from '@/utils/index';

const routeName = 'test';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/test',
    name: routeName,
    redirect: '/test/index',
    component: Layout,
    meta: {
      title: '测试页面',
      icon: renderIcon(CheckCircleOutlined),
      sort: 1,
    },
    children: [
      {
        path: 'index',
        name: `${routeName}_index`,
        meta: {
          title: '测试页面',
        },
        component: () => import('@/views/test/index.vue'),
      },
    ],
  },
];

export default routes;
